Skip to content

ASoC: SOF: skl enable the core and get ROM init - #120

Closed
zhuyingjiang wants to merge 1 commit into
thesofproject:topic/sof-devfrom
zhuyingjiang:topic/sof-dev-yjzhu
Closed

ASoC: SOF: skl enable the core and get ROM init#120
zhuyingjiang wants to merge 1 commit into
thesofproject:topic/sof-devfrom
zhuyingjiang:topic/sof-dev-yjzhu

Conversation

@zhuyingjiang

@zhuyingjiang zhuyingjiang commented Sep 10, 2018

Copy link
Copy Markdown

enable the kbl DSP core.
get the ROM init.

@zhuyingjiang zhuyingjiang self-assigned this Sep 10, 2018

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall needing more comments explaining what each block does.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed to set tag to 0?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is for debug, this function will be implement in next patch. and if not set a value, checkpatch will give a warning.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please always use C style comments /* comment */

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will change that.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just set tag = 0 at start of this function if it's always going to be 0 ???

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like answered above, the next patch will get the true tag value, this is only for debug.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

structures should always be at the top of the variables.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will change that.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, github can skew the formatting a little, so it's best to always run checkpatch.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have run the checkpatch, but don't know why here is still not aligned.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just github rendering, if checkpatch is OK then you are good.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls comment what we are setting and why

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so every register set need to be comment? Or only the main part?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally, every register if its not obvious.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to comment what this block does, and why we check core status here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will have comment on that.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please comment this block

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is just for debug ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly.

Comment thread sound/soc/sof/intel/hda-loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to temporarily add an offset here to strip the extended manifest when using the closed source firmware (as it has an extended manifest pre pended ato the start of the FW binary file) otherwise the FW will not authenticate or boot..

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ask @keyonjie for extended manifest details.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will ask Keyon what is the offset. We still need to check if the firmware is rightly booted?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, FW will not boot without the offset change and remove of extended manifest

1. enable the skl core
2. get the ROM int

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
@zhuyingjiang

Copy link
Copy Markdown
Author

@lgirdwood

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this PR is the correct one as it looks more complete than your other PR ? Can you close the old PR that way I know I'm reviewing the correct one.

unsigned int size, struct snd_dma_buffer *dmab,
int direction)
{
/* the skl cl dma don't use stream tag, ret is for debug */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this func if its not needed.

}

/* prepare DMA for code loader stream */
ret = cl_stream_prepare_skl(sdev, 0x40, fwsize, &sdev->dmab,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic number 0x40, please use a macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants